// 申请截图权限
images.requestScreenCapture();
// 初始化ColorMapping
let ColorMapping = colors.mapping;
// 创建ColorMapping实例
let cm = new ColorMapping();
// 截屏
let img = images.captureScreen();
// 初始化颜色映射
cm.reset(img);
// 使用ColorMapping多点找色
let whitePoints = cm.findAllPointsForColor("#ffffff");
let blackPoints = cm.findAllPointsForColor("#000000");
if (whitePoints != null) {
    log("白色点有" + whitePoints.length + "个");
} else {
    log("未找到白色点");
}
if (blackPoints != null) {
    log("黑色点有" + blackPoints.length + "个");
} else {
    log("未找到黑色点");
}
// 释放ColorMapping
cm.recycle();
